

const UserIntentCompact = ({ title, intents }) => {


    return (
        <>
            {intents && intents.length > 0 && 
            <div className="flex flex-row items-start justify-center px-2 mx-2">
                <div className="text-base font-bold m-2 p-2">{title}</div>
                <div className="flex-1 flex flex-row items-center justify-start px-2 py-0 mx-2 my-1">
                    <div className="flex flex-wrap">
                        {intents && intents.length > 0 ? intents.map((item, index) => {
                            return (
                                <div key={index} className="badge badge-primary m-2 px-2 py-1 text-white">{item}</div>
                            );
                        }) : (<div className="w-full flex flex-row items-center justify-center text-lg">暂无数据</div>)}
                    </div>
                </div>
            </div>
            }
        </>
    )
}

export default UserIntentCompact